#ifndef _EDBTOOL2_H_
#define _EDBTOOL2_H_

#include "edb.h"
#include "edl.h"

typedef enum {
	EDB_NULL_CMD,
	EDB_CREATE_CMD,
	EDB_XECREATE_CMD,
	EDB_GET_CMD,
	EDB_SET_CMD,
	EDB_ASRGET_CMD,
	EDB_ASRSET_CMD,
	EDB_SETREF_CMD,
	EDB_SETCPY_CMD,
	EDB_ADD_CMD,
	EDB_CLEAR_CMD,
	EDB_RENAME_CMD,
	EDB_DEL_CMD,
	EDB_XEDELETE_CMD,
	EDB_SNAPSHOT_CMD,
	EDB_ELECT_CMD,
	EDB_SHUTDOWN_CMD,
	EDB_HELP_CMD,
	EDB_CD_CMD,
	EDB_GET_MODINFOS_CMD,
	EDB_GETINHERITEDTYPES_CMD,
	ECHO_CMD,
	PROMPT_CMD,
	DBGSET_CMD,
	MTRACE_INFO_CMD,
	MTRACE_ON_CMD,
	MTRACE_OFF_CMD,
	MTRACE_CLEAR_CMD,
	MTRACE_REPORT_CMD,
	TREELOCK_INFO_CMD
} cmd_type_t;

typedef enum {
	ERR_ET2_GEN = -1,
	ET_OK,
	ERR_ET2_CMD,
	ERR_ET2_COND,
} et2_errtype_t;

typedef struct {
	int	field;
	int	applyopt;
} options_t;

typedef struct {
	char	*errtext;
	et2_errtype_t	errtype;
} et2_err_t;

extern int process_cmd(sr_t *sr);
extern char	*cwd;
extern char *get_arg(int argidx);
extern void do_exec_cmd(char *edexpr);

#endif
